package toString;

import java.awt.Color;

public class Circle extends GeometricObject{
	private double radius;

	

	public Circle() {
		super();
		radius=1.0;
//		color="white";
//		weight=1.0;
//		
	}

	public	Circle(double radius) {
		super();
		this.radius=radius;
	}

	
	public Circle(String color, double weight, double radius) {
		super(color, weight);
		this.radius = radius;
	}

	public double getRadius() {
		return radius;
	}

	public void setRadius(double radius) {
		this.radius = radius;
	}
	
	public double findArea() {
		return Math.PI*radius*radius;
		
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this ==obj) {
			return true;
			
		}
		if (obj instanceof Circle) {
			Circle circle=(Circle) obj;
			return this.radius==circle.radius;
		}
		return false;
	}

	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	

}
